home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 June / PCWorld_2007-06_cd.bin / temacd / wikipad / WikidPad-1.9beta2.exe / {app} / extensions / KeyBindings.py < prev    next >
Text File  |  2007-02-24  |  2KB  |  86 lines

  1. from wxPython.wx import *
  2. from wxPython.stc import *
  3.  
  4. NewWiki="Ctrl-N"
  5. OpenWiki="Ctrl-Alt-O"
  6. OpenWikiNewWindow=""
  7. SearchWiki="Ctrl-Alt-F"
  8. ViewBookmarks="Ctrl-Shift-B"
  9. ShowTreeControl="Ctrl-T"
  10. ShowToolbar="Ctrl-Shift-T"
  11. StayOnTop=""
  12. OpenWikiWord="Ctrl-O"
  13. Save="Ctrl-S"
  14. Print="Ctrl-P"
  15. Rename="Ctrl-Alt-R"
  16. Delete="Ctrl-D"
  17. AddBookmark="Ctrl-Alt-B"
  18. CatchClipboardAtPage=""
  19. CatchClipboardAtCursor=""
  20. CatchClipboardOff=""
  21. ActivateLink="Ctrl-L"
  22. ActivateLinkNewTab="Ctrl-Alt-L"
  23. # ActivateLinkBackground="Ctrl-Shift-L"
  24. ViewParents="Ctrl-Up"
  25. ViewParentless="Ctrl-Shift-Up"
  26. ViewChildren="Ctrl-Down"
  27. ViewHistory="Ctrl-H"
  28. SetAsRoot="Ctrl-Shift-Q"
  29. UpHistory="Ctrl-Alt-Up"
  30. DownHistory="Ctrl-Alt-Down"
  31. GoBack="Alt-Left"
  32. GoForward="Alt-Right"
  33. GoHome="Ctrl-Q"
  34. Bold="Ctrl-B"
  35. Italic="Ctrl-I"
  36. Heading="Ctrl-Alt-H"
  37. SpellCheck=""
  38. Cut="Ctrl-X"
  39. Copy="Ctrl-C"
  40. CopyToScratchPad="Ctrl-Alt-C"
  41. Paste="Ctrl-V"
  42. Undo="Ctrl-Z"
  43. Redo="Ctrl-Y"
  44. AddFileUrl=""
  45. FindAndReplace="Ctrl-R"
  46. ReplaceTextByWikiword="Ctrl-Shift-R"
  47. RewrapText="Ctrl-W"
  48. Eval="Ctrl-E"
  49. InsertDate="Ctrl-Alt-D"
  50. MakeWikiWord="Ctrl-J"
  51. ShowEditor="Ctrl-Shift-A"
  52. ShowPreview="Ctrl-Shift-S"
  53. ShowSwitchEditorPreview="Ctrl-Shift-Space"
  54. ZoomIn=""
  55. ZoomOut=""
  56. CloneWindow=""
  57.  
  58. ContinueSearch="F3"
  59. BackwardSearch="Shift-F3"
  60. AutoComplete="Ctrl-Space"
  61. ActivateLink2="Ctrl-Return"
  62. SwitchFocus="F6"
  63. StartIncrementalSearch="Ctrl-F"
  64.  
  65. # IncrementalSearchCtrl="F"   # Hack, changing not recommended
  66.  
  67.  
  68. def makeBold(editor):
  69.     editor.styleSelection(u'*')
  70.  
  71. def makeItalic(editor):
  72.     editor.styleSelection(u'_')
  73.  
  74. def addHeading(editor):
  75.     bytePos = editor.PositionAfter(editor.GetCurrentPos())
  76.     editor.CmdKeyExecute(wxSTC_CMD_HOME)
  77.     editor.AddText(u'+')
  78.     editor.GotoPos(bytePos)
  79.  
  80. def makeWikiWord(editor):
  81.     text = editor.GetSelectedText()
  82.     text = text.replace(u"'", u"")
  83.     text = text[0:1].upper() + text[1:]
  84.     text = u"[" + text + u"]"
  85.     editor.ReplaceSelection(text)
  86.